Due to poor counting statistics, the bright field, dark field and energy loss signals must be averaged over time. This is done by integrating the signals simultaneously at each pixel of the image. The programmable integrators have programmable gain and programmable time constants to enable the researcher to use as much of the dynamic range of the analog to digital converter as possible.